Skip to content

Conversation

@rani-pinchuk
Copy link
Contributor

@rani-pinchuk rani-pinchuk commented Sep 3, 2025

Shared memory names containing colons were not parsed correctly as the code of resource_tracker assumed that these names contain no colons.

@encukou

Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! Sorry for the delay in reviewing.
The fix looks good for colons, but a comment on the issue also mentioned newlines in filenames. Do you want to tackle that, or leave it to another PR?

Comment on lines +288 to +293
parts = line.strip().decode('ascii').split(':')
if len(parts) < 3:
raise ValueError("malformed resource_tracker message: %r" % (parts,))
cmd = parts[0]
rtype = parts[-1]
name = ':'.join(parts[1:-1])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this?

Suggested change
parts = line.strip().decode('ascii').split(':')
if len(parts) < 3:
raise ValueError("malformed resource_tracker message: %r" % (parts,))
cmd = parts[0]
rtype = parts[-1]
name = ':'.join(parts[1:-1])
cmd, *name_parts, rtype = line.strip().decode('ascii').split(':')
name = ':'.join(name_parts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants